/**
 * 
 */
package validator.simple;

import java.util.HashMap;
import java.util.Map;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;

import com.e885.log.E885Logger;

import common.UserCommand;

/**
 * @author Eric.Kao(gau168.gau@msa.hinet.net)
 * @version 1.0
 * @company E885 Group
 * @copyright Copyright (c) 2001-2008
 */

public class MemberSimpleFormController extends SimpleFormController
{

	/* (non-Javadoc)
	 * @see org.springframework.web.servlet.mvc.SimpleFormController#onSubmit(java.lang.Object)
	 */
	@Override
	protected ModelAndView onSubmit( Object command ) throws Exception
	{
		E885Logger.testLog.debug( "execute method onSubmit()" );
		
		UserCommand userCommand = (UserCommand)command;
		
		Map< String, String > map = new HashMap< String, String >();
		
		map.put( "name", userCommand.getName() );
		map.put( "password", userCommand.getPassword() );
		
		return new ModelAndView( getSuccessView(), "memberInfo", map );
	}

}
